package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

/**
 * @version 1.0
 * @description 说明
 * @package com.sky.mapper
 */
public interface UserMapper {

    /**
     * 通过openid查询数据库用户表中是否存在
     * @param openId
     * @return
     */
    @Select("select * from user where openid = #{openid}")
    User getByOpenid(String openId);

    /**
     * 新增用户
     * @param user
     */
    void insert(User user);
}
